﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	测压井观测（每月）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul>
                <li><a href="/Record/StackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="/Record/Settle/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>沉降及位移观测</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>测压井</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>测压仪</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div style="margin-top:20px;font-weight:bold;color:blue;text-align:center">测压井数据更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {
         List<Piezometer_well_base_info> wells = (List<Piezometer_well_base_info>)ViewData["wells"];
         List<Piezometer_well_monthly_info> wellsRecord = (List<Piezometer_well_monthly_info>)ViewData["wellsRecord"];
    %>

        <%= Html.ValidationSummary(true) %>
        <%= Html.Hidden("stack_id", ViewData["id"])%>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%= Html.Hidden("date", (DateTime)ViewData["date"])%>
            
    <table class="tableCss" cellspacing="0" cellpadding="0" align="center" border="0" style="margin-top:10px">
        <tr>
            <th colspan="2" class="heightrow" align="center" style="text-align:center">
                测压井观测（每月）
            </th>
        </tr>
        <tr>
            <td class="row1" align="left" width="100px" style="padding-left:20px">查看测压井位置：</td>
            <td class="row1" align="left">
                &nbsp;<%if (!string.IsNullOrEmpty((string)ViewData["piezometerWellPic"])){ %><a href="<%=Url.Content((string)ViewData["piezometerWellPic"]) %>" target="_blank">测压井位置图</a><%} %>
            </td>
        </tr>
        <tr>
            <td class="row1" align="left" width="100px" style="padding-left:20px">测量人员：</td>
            <td class="row1" align="left">
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="100%" border="1px" style="background-color:White;border:1px solid gray;">
                    <tr height="25px">
                        <td>测压井编号</td>
                        <td>孔顶标高（米）</td>
                        <td>孔底标高（米）</td>
                        <td>孔顶标高与井中水位高差（米）</td>
                        <td>说明</td>
                    </tr>
                    <%
                        if (wells != null & wells.Count > 0)
                        {
                            for (int i = 0; i < wells.Count; i++)
                            {
                                bool hasRecord = wellsRecord != null && wellsRecord.Count > i;
                    %>
                    <tr height="25px">
                        <td><%=wells[i].piezometer_well_id%></td>
                        <td><%=wells[i].well_top_El%></td>
                        <td><%=wells[i].Well_bottom_El%></td>
                        <td><input type="text" value="<%=hasRecord ? (wellsRecord[i].Height_difference.HasValue ? wellsRecord[i].Height_difference.Value.ToString() : ""): ""%>" name="Height_difference<%=i+1 %>" /></td>
                        <td><input type="text" value="<%=hasRecord ? wellsRecord[i].Remarks : ""%>" name="Remarks<%=i+1 %>" /></td>
                    </tr>
                    <%
                            }
                        }
                    %>

                </table>
            </td>
        </tr>

    </table>
    <div style="margin-top:25px;text-align:center">
        <input type="submit" value="提    交" style="font-size:16px;font-weight:bold" />
    </div>
    <% } %>
</asp:Content>
